
//比那名居的桃子:https://ac.nowcoder.com/acm/problem/224679
#include <iostream>
#include <vector>

using namespace std;

int main()
{
    int n , k;
    cin >> n >> k;
    vector<long long> l(n+1,0);
    vector<long long> x(n+1,0);
    for(int i = 1; i <= n; i++)
    {
        int c = 0;
        cin >> c;
        l[i] = l[i-1] + c;
    }
    
    for(int i = 1; i <= n; i++)
    {
        int c = 0;
        cin >> c;
        x[i] = x[i-1] + c;
    }
    
    int left = 1,right = k;
    int count = 1;
    long long lmax = l[k], xmin = x[k];
    while(right <= n)
    {
        long long c = l[right] - l[left-1];
        long long d = x[right] - x[left-1];
        if(c > lmax)
        {
            lmax = c;
            xmin = d;
            count = left;
        }
        else if(c == lmax && d < xmin)
        {
            count = left;
            xmin = d;
        }
        left++;
        right++;
    }
    
    cout << count;
    return 0;
}
